#pragma once

#include "gametemplate.h"

class CCharacterTemplate: public ITemplate
{
public:
	string name;
	BYTE kind;
	SHORT move_speed;
	BYTE att_delay;
	UINT ani_id;
	BYTE ai_see_range;
};

class CCharacterXMLParser :public CCSAXDelegator
{
public:
	bool initParsing();

private:
	void parseXMLFile();
	void startElement(void *ctx, const char *name, const char **atts);
	void endElement(void *ctx, const char *name);
	void textHandler(void *ctx, const char *s, int len);

	const char *_animFile;
	GAMETEMPLATE::TYPE _type;

typedef CCharacterTemplate TEMPLATE_TYPE;

private:
	string _lastelement;
	TEMPLATE_TYPE* _lastTemplate;
};